/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.grid.gui;

import java.awt.Image;
import java.awt.Toolkit;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.UIManager;

/**
 *
 * @author wellington
 */
public class LookAndFeelManager {

    public static void initLookAndFeel() {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void setIconImage(JFrame frame, String res) {
        Toolkit tk = Toolkit.getDefaultToolkit();
        Image img = tk.getImage(frame.getClass().getResource(res));
        frame.setIconImage(img);
    }
}
